package com.lxc.graduation.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lxc.graduation.dao.UserMapper;
import com.lxc.graduation.entity.domain.User;
import com.lxc.graduation.service.UserService;


import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: ck
 * @Description:
 * @Date: Create in 20:07 2021/1/19
 */
@Service
@Slf4j
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;


    @Override
    public User findByNameAndPwd(String name, String pwd) {
        log.info(name+"尝试登陆");

        return userMapper.selectOne(new QueryWrapper<User>().eq("name",name).eq("pwd",pwd));
    }

    @Override
    public void insert(User user) {
        userMapper.insert(user);
    }

    @Override
    public void print() {
        log.info("print");


    }
}
